package ysy.Proxy;

import java.lang.reflect.Proxy;

public class Client {
    public static void main(String[] args) {
        Man man = new Man();

        MyIn myIn = new MyIn(man);

        People o = (People)Proxy.newProxyInstance(People.class.getClassLoader(), new Class[]{People.class}, myIn);

        o.onEat();
        o.onSleep();
    }

}
